package com.luckberry.murder.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@AllArgsConstructor
public class House {

    private int hid;    // 房间号
    private int sid;    // 剧本号
    // 空闲 = idle, 占用 = occupied
    private String state;   // 房间状态

    public String transState() {
        if (state.equals("idle")) return "空闲";
        else if (state.equals("occupied")) return "占用";
        return "未知";
    }

    public String getColor() {
        if (state.equals("idle")) return "success";
         return "danger";
    }
}
